package top.yxqin.easymine.unit;

import org.bukkit.configuration.file.FileConfiguration;

import java.util.HashSet;
import java.util.Set;

//存储配置
public class Configs
{
    public static String PluginName="";
    public static int MaxDepth = 50;
    public static int SMaxDepth = 3;
    public static boolean enableVeinMine=true;
    public static boolean enableSuperDig=true;
    //连锁挖矿工具
    public static Set<String> Pickaxe_SET=new HashSet<>();
    public static Set<String> AXE_SET=new HashSet<>();
    public static Set<String> SHOVEL_SET=new HashSet<>();
    //连锁挖矿方块
    public static Set<String> Pickaxe_Block=new HashSet<>();
    public static Set<String> AXE_BLOCK=new HashSet<>();
    public static Set<String> SHOVEL_BLOCK=new HashSet<>();
    //超级挖掘工具
    public static Set<String> SuperDIG_TOOL=new HashSet<>();
    //超级挖掘方块
    public static Set<String> SuperDIG_BLOCK=new HashSet<>();
    public static void loadSetting(FileConfiguration setting)
    {
        MaxDepth = setting.getInt("VeinMine.MaxDepth");
        SMaxDepth = setting.getInt("SuperDig.MaxDepth");
        Pickaxe_SET.addAll(setting.getStringList("VeinMine.Pickaxe"));
        AXE_SET.addAll(setting.getStringList("VeinMine.AXE"));
        SHOVEL_SET.addAll(setting.getStringList("VeinMine.SHOVEL"));

        Pickaxe_Block.addAll(setting.getStringList("VeinMine.Pickaxe_Block"));
        AXE_BLOCK.addAll(setting.getStringList("VeinMine.AXE_BLOCK"));
        SHOVEL_BLOCK.addAll(setting.getStringList("VeinMine.SHOVEL_BLOCK"));

        SuperDIG_TOOL.addAll(setting.getStringList("SuperDig.Tool"));
        SuperDIG_BLOCK.addAll(setting.getStringList("SuperDig.Block"));

        enableVeinMine=setting.getBoolean("VeinMine.enable");
        enableSuperDig=setting.getBoolean("SuperDig.enable");
    }
}
